package com.dt76.smallloanbackenduser.remote.hzp;

import com.dt76.smallloanbackenduser.hystrix.hzp.HLoanMaterialHystrix;
import com.dt76.smallloanbackenduser.pojo.hzp.HLoanMaterial;
import com.dt76.smallloanbackenduser.utils.Page;
import com.dt76.smallloanbackenduser.utils.Result;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
@Component
@FeignClient(name="smallloan-backend-service", fallback = HLoanMaterialHystrix.class)
public interface HLoanMaterialRemote {
    @RequestMapping("/hzp/loanMaterial")
    List<HLoanMaterial> qryAllHLMM();
    //分页
    @RequestMapping("/hzp/getPage")
    Page qryPageHLoanMaterial(@RequestParam("pageIndex") Integer pageIndex,
                              @RequestParam("pageSize") Integer pageSize);
//    @RequestMapping("/hzp/findOne")
//    public HLoanMaterial findOne(@RequestParam("materialId") int materialId);
//    @RequestMapping(value = "/hzp/add",method = RequestMethod.POST,consumes = "application/json")
//    public Result add(@RequestBody HLoanMaterial hLoanMaterial);
}
